function [xSignal signal] = signal7(N, step)
%SIGNAL7 sign = sum of roots
%   INPUT:
%       step - distance between sequential argument values
%       N - number of roots to sum
%   OUTPUT:
%       xSignal - argument values
%       signal - signal values
xSignal = -30:step:30;
% array of distribution means
means = randi([min(xSignal)+3 max(xSignal)-3],N,1);
means = sort(means);

% array of distribution sigmas on [a b]
a = 0.2;
b = 2;
sigma = a + (b - a) * rand(N,1);
fmeans = zeros(N,1);
signal = zeros(length(xSignal),1);
for i=1:N
    signal = signal + rightgaussmf(xSignal, sigma(i), means(i));
    fmeans(i) = rightgaussmf(means(i), sigma(i), means(i));
end;